﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GraphCompiler.Core
{
    public class Token
    {
        public Token(string tokenString)
        {
            String = tokenString;
        }

        public string String { get; private set; }

        public override bool Equals(object obj)
        {
            if (obj == null || GetType() != obj.GetType())
            {
                return false;
            }

            Token other = obj as Token;

            return String == other.String;
        }

        public override int GetHashCode()
        {
            return String.GetHashCode();
        }

        public override string ToString()
        {
            return String;
        }
    }
}
